<?php
function google_map_location_filter($op, $delta = 0, $format = -1, $text = '') { 
  switch ($op) {
    case 'list':
      return array(0 => t('Google Map Location Filter'));

    case 'description':
      switch ($delta) {
        case 0:
          return t('Allows you to display google map.');
        default:
          return;
      }

    case 'process':
      switch ($delta) {
        case 0:
         module_load_include('inc', 'google_map_location','google_map_location');
	$options = array(
		'key' => variable_get('GOOGLE_KEY',GOOGLE_KEY),
		'center_x' => variable_get('GOOGLE_CENTER_X',GOOGLE_CENTER_X),
		'center_y' => variable_get('GOOGLE_CENTER_Y',GOOGLE_CENTER_Y),
		'map_width' => variable_get('GOOGLE_MAP_WIDTH',GOOGLE_MAP_WIDTH),
		'map_height' => variable_get('GOOGLE_MAP_HEIGTH',GOOGLE_MAP_HEIGTH),
		'zoom' => variable_get('GOOGLE_ZOOM',GOOGLE_ZOOM),
		'items' => load_gmap_location_options(),
	);
	$str = theme('google_map_location_display', $options);
          return str_replace('{@google-map-location}',$str,$text);
        default:
          return $text;
      }
	  

    case 'settings':
      switch ($delta) {
        default:
          return;
      }
    
    default:
      return $text;
  }
}
?>